package com.study.lambda.demo;

import com.study.common.entity.Model;

import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;

public class Test {

    public static void main(String[] args) {
        MyLambda myLambda = () -> System.out.println("123");
        myLambda.say();

        Function<String, Integer> function = (s) -> Integer.valueOf(s);
        System.out.println(function.apply("456"));

        Consumer<String> consumer = s -> System.out.println(s);
        consumer.accept("789");

        Supplier<String> supplier = () -> "abc";
        System.out.println(supplier.get());

        MyLambda myLambda1 = Model::test1;
        myLambda1.say();
    }
}
